package com.xl.object;

public class Test {
    public static void main(String[] args) {
        //面向对象编程
        //创建一个对象，封装学生
        Student s1 = new Student();
        s1.name = "张三";
        s1.chineseScore = 98;
        s1.mathScore = 94;
        s1.totalScore();
        s1.averageScore();
        //再创建一个对象，封装学生
        Student s2 = new Student();
        s2.name = "李四";
        s2.chineseScore = 78;
        s2.mathScore = 79;
        s2.totalScore();
        s2.averageScore();

        System.out.println(s1);
        System.out.println(s2);
    }
}
